package com.styytech.dadabao.widge.progressbar;

import com.styytech.dadabao.widge.progressbar.roundprogressbar.RoundProgressBar;

/**
 * Created by user on 2015/8/13.
 */
public class RoundThread extends Thread {
    private int now_progress;
    private int progress = 0;
    private RoundProgressBar roundProgressBar;
   public RoundThread(int progress,RoundProgressBar mRoundProgressBar1){
        this.now_progress=progress;
        this.roundProgressBar=mRoundProgressBar1;
    }
    public void run() {
    	try {
			Thread.sleep(400);
		} catch (InterruptedException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
        roundProgressBar.setProgress(progress);
        while(progress <= now_progress){


            roundProgressBar.setProgress(progress);
            try {
                Thread.sleep(15);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            progress += 1;
        }
    }
}
